#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <stdlib.h>
#include<time.h>
int main(){
	time_t currenttime;
	char path[20];
	char arr[20];
	struct tm * localTime =NULL;
	time(&currenttime);
	localTime	= localtime(&currenttime);
	printf("输入路径");
	scanf("%s",path);
	sprintf(arr,"%d-%d",localTime->tm_mon +1,localTime->tm_mday);
	printf("%s\n",arr);
	strcat(path,arr);
	printf("完整路径: %s\n", path);
	int k =0;
	k = mkdir(path,0755);
	if (k == 0) {              
        printf("目录创建成功: %s\n", path);  
    } 
	else {
        perror("目录创建失败"); 
    }
	return 0;
}
